import request from './request'

export function login(params: object) {
    return request({
        url: 'account/login',
        params: params,
        method: 'get'
    })
}

export function search(data: object) {
    return request({
        url: 'info/search',
        data: data,
        method: 'post'
    })
}

export function searchDepartment(data: object) {
    return request({
        url: 'info/search/department',
        data: data,
        method: 'post'
    })
}

export function modifyBasicInfo(id: string) {
    return request({
        url: 'info/confirm/' + id,
        method: 'put'
    })
}

export function searchAccount(data: object) {
    return request({
        url: 'account/search',
        data: data,
        method: 'post'
    })
}

export function delAccountApi(accountId: string) {
    return request({
        url: 'account/' + accountId,
        method: 'delete'
    })
}

export function editAccountPassWord(data: object) {
    return request({
        url: 'account/update',
        data: data,
        method: 'post'
    })
}

export function addDepartmentApi(params: object) {
    return request({
        url: 'account/create/department',
        params: params,
        method: 'put'
    })
}

export function delDepartmentApi(id: number) {
    return request({
        url: 'account/delete/department/' + id,
        method: 'delete'
    })
}

export function searchMeetingApi(data: object) {
    return request({
        url: 'meeting/search',
        data: data,
        method: 'post'
    })
}

export function addMeetingApi(data: object) {
    return request({
        url: 'meeting/create',
        data: data,
        method: 'post'
    })
}

export function deleteMeetingApi(id: string) {
    return request({
        url: 'meeting/' + id,
        method: 'delete'
    })
}

export function showQrcodeApi(id: string) {
    return request({
        url: 'common/meeting/' + id,
        method: 'get'
    })
}

export function searchBasicMeetingApi(data: object) {
    return request({
        url: 'basicMeeting/search',
        data: data,
        method: 'post'
    })
}

export function setLocationApi(data: object) {
    return request({
        url: 'basicMeeting/set',
        data: data,
        method: 'put'
    })
}

export function sendMeetingEmailApi(id : string){
    return request({
        url: 'basicMeeting/put/' + id,
        method: 'put'
    })
}

export function setDepartmentApi(params: object){
    return request({
        url: 'info/set/department',
        params: params,
        method: 'put'
    })
}
